<template>
	<router-link
		:to="handleBack()"
		class="flex items-center justify-between slot-card__header no-underline">
		<div class="flex items-center">
			<base-button
				class="w-[40px] h-[40px] rounded-sm px-[5px] bg-bg-4"
				@click="handleBack"
				size="small"
				:block="false">
				<base-icon name="back" size="20" />
			</base-button>
			<BaseText class="pl-2 text-t-1 text-[24px]" :text="title" :textT="titleT" />
		</div>
	</router-link>
</template>
<script lang="ts" setup>
import { BaseButton, BaseIcon, BaseText } from '@/components/base'

const props = defineProps({
	title: {
		type: String,
		default: ''
	},
	titleT: {
		type: [String, Array],
		default: ''
	},
	go: {
		type: String,
		default: '-'
	}
})

const handleBack = () => {
	if (props.go === '-') {
		return {
			name: 'casinoAllTags'
		}
	} else {
		return {
			name: props.go
		}
	}
}
</script>
